package com.artpri.dao.impl;

import java.util.List;

import org.hibernate.transform.Transformers;

import com.artpri.dao.GoodsCategoryDao;
import com.artpri.model.GoodsCategory;

/**
 * @author ZhangSi
 */
public class GoodsCategoryDaoImpl extends HibernateDaoImpl<GoodsCategory> implements
		GoodsCategoryDao {

	@SuppressWarnings("unchecked")
	@Override
	public List<GoodsCategory> getCategoryByGroup(Integer gcgId) {
		return getSqlQuery("select gc_id gcId, category_name categoryName from category_join_group cj where cj.gcg_id="+gcgId)
				.setResultTransformer(Transformers.aliasToBean(GoodsCategory.class))
				.list();
	}

	
}
